lib/refs: Add runtime error checking for collection ID validity
authorPhilip Withnall <withnall@endlessm.com>
Fri, 23 Jun 2017 14:55:19 +0000 (15:55 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 26 Jun 2017 15:56:07 +0000 (15:56 +0000)
commitd0d5f54ce2b6c47ec80bfb0fce8e31049d39361d
tree9164f5e484ca24499815211244bb0cee4802c55b
parent11ad3ec5293dbcd6241cdb3220e62785b07b9290
lib/refs: Add runtime error checking for collection ID validity

Instead of treating it as a programming error — given that it’s user
input, that’s not really appropriate. This modifies write_ref() and
list_collection_refs() to implement validation.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #924
Approved by: cgwalters
src/libostree/ostree-repo-refs.c